#-*-coding:UTF-8-*-
'''
Copyright (c) [Year] [name of copyright holder]
[Software Name] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
         http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
'''
import random as r

class PathError(Excepition):
	def __init__(self,path):
		super().__init__(self,path,message)
		self.path=path
		error_code=hex(r.randint(1,65536))
		print("Error 404:no path  /n error code:"+error_code)
		

class FileError(PathError,Excepition):
	def __init__(self,path):
		super().__init__(self,path,filename,message)
		self.path=path
		self.filename=filename
		error_code=oct(r.randint(1,65536))
		print("Error 404 :no file /n error code:"+error_code)
		
class OS_Error(Excepition):
	def __init__(self,path):
		super().__init__(self,path,filename,message)
		self.filename=filename
		self.path=path
		print("Error 502: system terminal error /n file name:{0} /n path:{1}".format(filename,path))

class Syntax_Error(OS_Error,Exception):
	def __init__(self):
		super().__init__(self,code,message)
		self.code=code
		self.message=message
		print("Error 422:no such syntax /n code:"+code)
		
#endif